/*
 * surveyorsvs_driver.h
 *
 *  Wrapper class around libsurveyorsvs
 */

#ifndef SURVEYORSVS_DRIVER_H_
#define SURVEYORSVS_DRIVER_H_


#include "libsurveyorsvs/surveyorsvs.h"

#include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <camera_info_manager/camera_info_manager.h>
#include <sensor_msgs/CameraInfo.h>

class SurveyorSVS_Driver {
public:
	SurveyorSVS_Driver(ros::NodeHandle nh);
	~SurveyorSVS_Driver();
	void poll();
protected:
	void publish_images(const sensor_msgs::ImagePtr master_image, const sensor_msgs::ImagePtr slave_image);
	void get_images(sensor_msgs::ImagePtr master_image, sensor_msgs::ImagePtr slave_image);

	ros::NodeHandle svs_nh;
	ros::NodeHandle priv_nh;
	boost::shared_ptr<image_transport::ImageTransport> svs_it;
	image_transport::CameraPublisher master_image_raw_pub;
	image_transport::CameraPublisher slave_image_raw_pub;
	camera_info_manager::CameraInfoManager master_cinfo_mgr;
	camera_info_manager::CameraInfoManager slave_cinfo_mgr;

	std::string str_ip_addr;
	int master_port;
	int slave_port;
	svs_image_mode_enum image_mode;
	std::string master_frame_id;
	std::string slave_frame_id;
	svs_comm_t* svs_dev;
};

#endif /* SURVEYORSVS_DRIVER_H_ */
